package com.platform.entity;

import com.platform.utils.StringUtils;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * @author lipengjun
 * @email 939961241@qq.com
 * @date 2017-08-13 10:41:09
 */
@Data
public class ReturnEntity implements Serializable {
    public static final String TYPE_RM	=	"1";		//退钱
    public static final String TYPE_RG	=	"2";		//退货

    public static final String STATUS_DEAL	=	"1";	//退货处理中
    public static final String STATUS_CLOSE	=	"2";	//退货关闭

    public static final String AUDIT_STATUS_INIT	=	"1";	//退货待审核
    public static final String AUDIT_STATUS_PASS		=	"2";	//退货审核通过
    public static final String AUDIT_STATUS_REJECT		=	"3";	//退货审核拒绝

    private Long id;

    private Long orderId;

    private Long orderGoodsId;

    private Date applyTime;

    private Integer number;

    private String type;

    private String reasonCode;

    private String reasonDesc;

    private String remark;

    private String pic1Url;
    private String pic2Url;
    private String pic3Url;
    private String pic4Url;
    private String pic5Url;
    private String pic6Url;

    private Integer shippingId;

    private String shippingCode;

    private String shippingName;

    private String shippingNo;

    private String status;

    private String auditStatus;

    private Date auditTime;

    private String auditRemark;

    private Date closeTime;

    public String getStatusDesc(){
        if (status == null) {
            return "";
        } else if (status.equals(STATUS_DEAL)){
            return "处理中";
        } else {
            return "已关闭";
        }

    }

    public String getAuditStatusDesc(){
        if (auditStatus == null) {
            return "";
        } else if (auditStatus.equals(AUDIT_STATUS_INIT)){
            return "待审核";
        } else if (auditStatus.equals(AUDIT_STATUS_PASS)) {
            return "审核通过";
        } else {
            return "审核不通过";
        }
    }

    public String getTypeDesc(){
        if (type == null) return "";
        if (type.equals(TYPE_RG)) return "退货";
        if (type.equals(TYPE_RM)) return "退款";
        return "";
    }


}
